package cn.cwx.code.common.interceptors;

import cn.cwx.code.home.entity.User;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by GJ on 2017/6/21.
 */
public class Interceptors implements HandlerInterceptor {
    /**
    *@Author  CWX
    *@Date 2017/6/21 18:23
    *@description 拦截 Session "user-login"
    */
    @Override
    public boolean preHandle(HttpServletRequest Request, HttpServletResponse Response, Object o) throws Exception {
        String url=Request.getRequestURI();
        System.out.println(url);
        return true;
        }
    @Override
    public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception {

    }
    @Override
    public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception {

    }
}
